home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 February: Tool Chest / Dev.CD Feb 95 / Dev.CD Feb 95.toast / Tool Chest / QuickDraw GX / QuickDraw GX Info / QuickDraw GX Interfaces / Interfaces & Libraries / Pascal Interfaces & Libraries / Pascal Interfaces / LayoutRoutines.p < prev    next >
Encoding:
Text File  |  1994-04-02  |  8.9 KB  |  220 lines  |  [TEXT/MPS ]

  1. {
  2.  layout routines.h -- Line Layout calls
  3.  
  4.     by Eric Mader and Dave Opstad,
  5.     with special thanks to the following folks:
  6.         • Mark Davis, for starting it all off;
  7.         • Russ Sonnenschein, for many good ideas;
  8.         • Cary Clark, Dave Good, Rob Johnson, Keith McGreggor, and Chris Yerga for the graphics system;
  9.         • Richard Becker, Lynn Bekkala and Mike Reed for fonts and the gxFont system;
  10.         • Robert Dierkes and the SQE team for testing and good ideas;
  11.         • Parry Kejriwal and Richard Klein, for gxFont tools;
  12.         • Diane Patterson, for great patience in writing documentation;
  13.         • Hugo Ayala, Tom Dowdy, Dan Lipton, Sean Parent and the rest of the PrintShop;
  14.         • Mitch Allen for managing to manage us; and
  15.         • many other good folk at Apple!
  16.  
  17. }
  18.  
  19. {$IFC UNDEFINED UsingIncludes}
  20. {$SETC UsingIncludes := 0}
  21. {$ENDC}
  22.  
  23. {$IFC NOT UsingIncludes}
  24.     UNIT LayoutRoutines;
  25.     INTERFACE
  26. {$ENDC}
  27.  
  28. {$IFC UNDEFINED UsingLayoutRoutines}
  29. {$SETC UsingLayoutRoutines := 1}
  30.  
  31.  
  32. { Copyright ©1998-1992 Apple Computer, Inc.  All rights reserved. }
  33.  
  34. {$I+}
  35. {$SETC LayoutRoutinesIncludes := UsingIncludes}
  36. {$SETC UsingIncludes := 1}
  37. {$IFC UNDEFINED UsingGraphicsTypes}
  38. {$I $$Shell(PInterfaces)GraphicsTypes.p}
  39. {$ENDC}
  40. {$IFC UNDEFINED UsingMathTypes}
  41. {$I $$Shell(PInterfaces)MathTypes.p}
  42. {$ENDC}
  43. {$IFC UNDEFINED UsingLayoutTypes}
  44. {$I $$Shell(PInterfaces)LayoutTypes.p}
  45. {$ENDC}
  46. {$SETC UsingIncludes := LayoutRoutinesIncludes}
  47.  
  48. FUNCTION GXNewLayout(textRunCount: LongInt;
  49.         textRunLengths: IntegerArray;
  50.         text: PtrArray;
  51.         styleRunCount: LongInt;
  52.         styleRunLengths: IntegerArray;
  53.         styles: GxStyleArray;
  54.         levelRunCount: LongInt;
  55.         levelRunLengths, levels: IntegerArray;
  56.         layoutOptions: GxLayoutOptionsPointer;
  57.         position: GxPointPointer): GxShape; C;
  58.  
  59. FUNCTION GXGetLayout(layout: GxShape;
  60.         text: Ptr;
  61.         VAR styleRunCount: LongInt;
  62.         VAR styleRunLengths: Integer;
  63.         VAR styles: GxStyle;
  64.         VAR levelRunCount: LongInt;
  65.         VAR levelRunLengths, levels: Integer;
  66.         VAR layoutOptions: GxLayoutOptions;
  67.         VAR position: GxPoint): LongInt; C;
  68.  
  69. PROCEDURE GXSetLayout(layout: GxShape;
  70.         textRunCount: LongInt;
  71.         textRunLengths: IntegerArray;
  72.         text: PtrArray;
  73.         styleRunCount: LongInt;
  74.         styleRunLengths: IntegerArray;
  75.         styles: GxStyleArray;
  76.         levelRunCount: LongInt;
  77.         levelRunLengths, levels: IntegerArray;
  78.         layoutOptions: GxLayoutOptionsPointer;
  79.         position: GxPointPointer); C;
  80.  
  81. PROCEDURE GXDrawLayout(textRunCount: LongInt;
  82.         textRunLengths: IntegerArray;
  83.         text: PtrArray;
  84.         styleRunCount: LongInt;
  85.         styleRunLengths: IntegerArray;
  86.         styles: GxStyleArray;
  87.         levelRunCount: LongInt;
  88.         levelRunLengths, levels: IntegerArray;
  89.         layoutOptions: GxLayoutOptionsPointer;
  90.         position: GxPointPointer); C;
  91.  
  92. PROCEDURE GXSetLayoutParts(layout: GxShape;
  93.         oldStartOffset, oldEndOffset: GxByteOffset;
  94.         newTextRunCount: LongInt;
  95.         newTextRunLengths: IntegerArray;
  96.         newText: PtrArray;
  97.         newStyleRunCount: LongInt;
  98.         newStyleRunLengths: IntegerArray;
  99.         newStyles: GxStyleArray;
  100.         newLevelRunCount: LongInt;
  101.         newLevelRunLengths, newLevels: IntegerArray); C;
  102.  
  103. PROCEDURE GXSetLayoutShapeParts(layout: GxShape; startOffset, endOffset: GxByteOffset; insert: GxShape); C;
  104.  
  105. FUNCTION GXGetLayoutParts(layout: GxShape;
  106.         startOffset, endOffset: GxByteOffset;
  107.         text: Ptr;
  108.         VAR styleRunCount: LongInt;
  109.         VAR styleRunLengths: Integer;
  110.         VAR styles: GxStyle;
  111.         VAR levelRunCount: LongInt;
  112.         VAR levelRunLengths, levels: Integer): LongInt; C;
  113.  
  114. FUNCTION GXGetLayoutShapeParts(layout: GxShape; startOffset, endOffset: GxByteOffset; dest: GxShape): GxShape; C;
  115.  
  116. FUNCTION GXGetLayoutGlyphs(layout: GxShape;
  117.         VAR glyphs: GxGlyphcode;
  118.         VAR positions: GxPoint;
  119.         VAR advance: LongInt;
  120.         VAR tangents: GxPoint;
  121.         VAR runCount: LongInt;
  122.         VAR styleRuns: Integer;
  123.         VAR glyphStyles: GxStyle): LongInt; C;
  124.  
  125. FUNCTION GXHitTestLayout(layout: GxShape;
  126.         hitDown: GxPointPointer;
  127.         highlightType: GxHighlightType;
  128.         VAR hitInfo: GxLayoutHitInfo;
  129.         hitTrackingArea: GxShape): GxByteOffset; C;
  130.  
  131. FUNCTION GXGetLayoutHighlight(layout: GxShape; startOffset, endOffset: GxByteOffset; highlightType: GxHighlightType; highlight: GxShape): GxShape; C;
  132.  
  133. FUNCTION GXGetLayoutVisualHighlight(layout: GxShape;
  134.         startOffset: GxByteOffset;
  135.         startLeadingEdge: LongInt;
  136.         endOffset: GxByteOffset;
  137.         endLeadingEdge: LongInt;
  138.         highlightType: GxHighlightType;
  139.         highlight: GxShape): GxShape; C;
  140.  
  141. FUNCTION GXGetLayoutCaret(layout: GxShape; offset: GxByteOffset; highlightType: GxHighlightType; caretType: GxCaretType; caret: GxShape): GxShape; C;
  142.  
  143. FUNCTION GXGetLayoutBreakOffset(layout: GxShape;
  144.         startOffset: GxByteOffset;
  145.         lineWidth: Fixed;
  146.         hyphenationCount: LongInt;
  147.         hyphenationPoints: GxByteOffsetArray;
  148.         VAR startIsStaked: Boolean;
  149.         VAR priorStake, nextStake: GxByteOffset): GxByteOffset; C;
  150.  
  151. FUNCTION GXGetLayoutRangeWidth(layout: GxShape; startOffset, endOffset: GxByteOffset; supplementaryText: GxShape): Fixed; C;
  152.  
  153. FUNCTION GXNewLayoutFromRange(layout: GxShape;
  154.         startOffset, endOffset: GxByteOffset;
  155.         layoutOptions: GxLayoutOptionsPointer;
  156.         supplementaryText: GxShape): GxShape; C;
  157.  
  158. FUNCTION GXGetCaretAngleArea(layout: GxShape;
  159.         hitPoint: GxPointPointer;
  160.         highlightType: GxHighlightType;
  161.         caretArea: GxShape;
  162.         VAR returnedRise, returnedRun: Integer): GxShape; C;
  163.  
  164. PROCEDURE GXGetStyleBaselineDeltas(baseStyle: GxStyle; baseType: GxBaselineType; returnedDeltas: GxBaselineDeltas); C;
  165.  
  166. FUNCTION GXGetRightVisualOffset(layout: GxShape; currentOffset: GxByteOffset): GxByteOffset; C;
  167. FUNCTION GXGetLeftVisualOffset(layout: GxShape; currentOffset: GxByteOffset): GxByteOffset; C;
  168.  
  169. PROCEDURE GXGetCompoundCharacterLimits(layout: GxShape; trial: GxByteOffset; VAR minOffset, maxOffset: GxByteOffset; VAR onBoundary: Boolean); C;
  170.  
  171. PROCEDURE GXGetOffsetGlyphs(layout: GxShape;
  172.         trial: GxByteOffset;
  173.         leadingEdge: LongInt;
  174.         VAR offsetState: GxLayoutOffsetState;
  175.         VAR firstGlyph, secondGlyph: UnsignedLongint); C;
  176.  
  177. PROCEDURE GXGetGlyphOffsets(layout: GxShape;
  178.         trial: GxByteOffset;
  179.         onLeftTop: LongInt;
  180.         VAR offset: GxByteOffset;
  181.         VAR leadingEdge, wasRealCharacter: Boolean); C;
  182.  
  183. PROCEDURE GXGetLayoutSpan(layout: GxShape; VAR lineAscent, lineDescent: Fixed); C;
  184. PROCEDURE GXSetLayoutSpan(layout: GxShape; lineAscent, lineDescent: Fixed); C;
  185.  
  186. PROCEDURE GXSetStyleRunControls(target: GxStyle; runControls: GxRunControlsPointer); C;
  187. PROCEDURE GXSetStyleRunPriorityJustOverride(target: GxStyle; priorityJustificationOverride: GxPriorityJustificationOverridePointer); C;
  188. PROCEDURE GXSetStyleRunGlyphJustOverrides(target: GxStyle; count: LongInt; glyphJustificationOverrides: GxGlyphJustificationOverrideArray); C;
  189. PROCEDURE GXSetStyleRunGlyphSubstitutions(target: GxStyle; count: LongInt; glyphSubstitutions: GxGlyphSubstitutionArray); C;
  190. PROCEDURE GXSetStyleRunFeatures(target: GxStyle; count: LongInt; runFeatures: GxRunFeatureArray); C;
  191. PROCEDURE GXSetStyleRunKerningAdjustments(target: GxStyle; count: LongInt; kerningAdjustments: GxKerningAdjustmentArray); C;
  192.  
  193. PROCEDURE GXSetShapeRunControls(target: GxShape; runControls: GxRunControlsPointer); C;
  194. PROCEDURE GXSetShapeRunPriorityJustOverride(target: GxShape; priorityJustificationOverride: GxPriorityJustificationOverridePointer); C;
  195. PROCEDURE GXSetShapeRunGlyphJustOverrides(target: GxShape; count: LongInt; glyphJustificationOverrides: GxGlyphJustificationOverrideArray); C;
  196. PROCEDURE GXSetShapeRunGlyphSubstitutions(target: GxShape; count: LongInt; glyphSubstitutions: GxGlyphSubstitutionArray); C;
  197. PROCEDURE GXSetShapeRunFeatures(target: GxShape; count: LongInt; runFeatures: GxRunFeatureArray); C;
  198. PROCEDURE GXSetShapeRunKerningAdjustments(target: GxShape; count: LongInt; kerningAdjustments: GxKerningAdjustmentArray); C;
  199.  
  200. FUNCTION GXGetStyleRunControls(source: GxStyle; VAR runControls: GxRunControls): LongInt; C;
  201. FUNCTION GXGetStyleRunPriorityJustOverride(source: GxStyle; VAR priorityJustificationOverride: GxPriorityJustificationOverride): LongInt; C;
  202. FUNCTION GXGetStyleRunGlyphJustOverrides(source: GxStyle; VAR glyphJustificationOverrides: GxGlyphJustificationOverride): LongInt; C;
  203. FUNCTION GXGetStyleRunGlyphSubstitutions(source: GxStyle; VAR glyphSubstitutions: GxGlyphSubstitution): LongInt; C;
  204. FUNCTION GXGetStyleRunFeatures(source: GxStyle; VAR runFeatures: GxRunFeature): LongInt; C;
  205. FUNCTION GXGetStyleRunKerningAdjustments(source: GxStyle; VAR kerningAdjustments: GxKerningAdjustment): LongInt; C;
  206.  
  207. FUNCTION GXGetShapeRunControls(source: GxShape; VAR runControls: GxRunControls): LongInt; C;
  208. FUNCTION GXGetShapeRunPriorityJustOverride(source: GxShape; VAR priorityJustificationOverride: GxPriorityJustificationOverride): LongInt; C;
  209. FUNCTION GXGetShapeRunGlyphJustOverrides(source: GxShape; VAR glyphJustificationOverrides: GxGlyphJustificationOverride): LongInt; C;
  210. FUNCTION GXGetShapeRunGlyphSubstitutions(source: GxShape; VAR glyphSubstitutions: GxGlyphSubstitution): LongInt; C;
  211. FUNCTION GXGetShapeRunFeatures(source: GxShape; VAR runFeatures: GxRunFeature): LongInt; C;
  212. FUNCTION GXGetShapeRunKerningAdjustments(source: GxShape; VAR kerningAdjustments: GxKerningAdjustment): LongInt; C;
  213.  
  214.  
  215. {$ENDC}
  216.  
  217. {$IFC NOT UsingIncludes}
  218.     END.
  219. {$ENDC}
  220.